import {lazy} from "react";
import {Navigate} from "react-router-dom";

// 用户管理路由
import UserRouter from "./User/router";
// 项目管理路由
import ProjectRouter from "./Project/router";
// 公告管理路由
import AnnouncementRouter from "./Announcement/router"
// 教务管理路由
import AcademicAffairs from "./AcademicAffairs/router"
// 首页和我的路由
import HomeRouter from "./Home/router"
// 论面试路由
import InterviewRouter from "./Interview/router"

const Main = lazy(() => import("./Main"))


export default [
  // 主页面路由
  {
    path: "/main", element: <Main/>, children: [
      // 主路由 子路由
      {path: "/main", element: <Navigate replace to="/main/home"/>},
      ...HomeRouter,
      ...UserRouter,
      ...ProjectRouter,
      ...AnnouncementRouter,
      ...AcademicAffairs,
      ...InterviewRouter
    ]
  },
]